import request from "@/js/util/request";
//查询全部商品
export const BookAllService = ()=>{
    let result = request.get("/all");
    return result;
}
//查询分页数据
export const PageService = (pagination) =>{
    let url = "?currentPage="+pagination.value.currentPage+"&size="+pagination.value.pageSize
        +"&category="+pagination.value.category+"&bookName="+pagination.value.bookName
    let result = request.get("/page"+url)
    return result
}

//查询图书种类
export const CategoryGetService = () => {
    return request.get("/getCategory")
}

//得到某一种类的全部图书
export const bookCategoryService = (category) => {
    let url = "?category="+category
    return request.get("/bookCategory" + url)
}

//根据Id查找书籍
export const ByBookIdService = (bookId) => {
    let url = "?bookId=" + bookId
    return request.get("/ByBookId" + url)
}